package com.calvin.combat.util;

import android.content.Context;
import android.content.SharedPreferences.Editor;

public class Config {
	public final static String APPLICATION_ID_TAG="com.calvin.combat";
	public final static String KEY_TOKEN="token";
	public Config() {
		
	}
	
	public static String getToken(Context context){
		return context.getSharedPreferences(APPLICATION_ID_TAG, context.MODE_PRIVATE).getString(KEY_TOKEN, null);
	}

	/*
	 * get cache token
	 * */
	public static void cacheToken(Context context,String token){
		Editor editor = context.getSharedPreferences(APPLICATION_ID_TAG, context.MODE_PRIVATE).edit();
		editor.putString(KEY_TOKEN, token);
		editor.commit();
	}
}
